<script type="text/javascript">
	function changeProductSearch() {
		$(".search-tab li:eq(0)").addClass("cur");
		$(".search-tab li:eq(1)").removeClass("cur");
		$("#type").val("0");
	}
	
	function changeBrandSearch() {
		$(".search-tab li:eq(1)").addClass("cur");
		$(".search-tab li:eq(0)").removeClass("cur");
		$("#type").val("1");
	}
	
	function changeCity(id){
		$.ajax({
		   type: "POST",
		   url: path + "/basic/changeCity.htm?id="+id,
		   success: changeCityCallback
		});
	}
	
	function changeCityCallback(result){
		eval(result);
	}
</script>
<header id="header" class="header">
	<h1 class="logo"><a href="#"><img src="${basePath}img/logo_144_66.jpg" alt="乐共享" />乐共享</a></h1>
	<div class="city" id="J-city">
		<span class="t">你所在城市</span>
		<em class="cur"><i></i><label id="areaName"><#if city?exists>${city.areaName}</#if></label></em>
		<!-- S 20111220新增城市列表 -->
		<div class="choose-city" id="choose-city">
			<#if citys?exists>
				<#list citys as city>
					<a href="javascript:changeCity(${city.id});">${city.areaName}</a>
				</#list>
			</#if>
		</div>
		<!-- E 20111220新增城市列表 -->
	</div>
	<section class="search-bar">
		<ul class="search-tab">
			<li class="cur"><a href="javascript:changeProductSearch();" >商品</a></li>
			<li><a href="javascript:changeBrandSearch();" >品牌</a></li>
		</ul>
		<div class="search-panel" id="J-search-panel">
			<form action="${basePath}search/index.htm" method="post" name="search-form">
				<input type="hidden" name="type" id="type" value="0"/>
				<div class="search-input" id="J-search-input">
					<input type="text" name="content" id="content" class="input-txt" />
					<b></b>
				</div>
				<input type="submit" class="search-btn" value="搜索" />
			</form>
		</div>
	</section>
</header>